A conventional compressor used for an air conditioning system and a cooling system includes a compressing mechanism and an electric motor which drives the compressing mechanism, and both the compressing mechanism and electric motor are provided in a casing. The compressing mechanism compresses refrigerant gas which returned from a refrigeration cycle, and sends the refrigerant gas to the refrigeration cycle. Generally, refrigerant gas compressed by the compressing mechanism once flows around the electric motor, thereby cooling the electric motor and then, the refrigerant gas is sent to the refrigeration cycle from a discharge pipe provided in the casing (see patent document 1 for example). That is, refrigerant gas compressed by the compressing mechanism is discharged from a discharge port to a discharge space. Thereafter, the refrigerant gas passes through a passage provided in an outer periphery of a frame, and is discharged into an upper portion of an electric motor space between the compressing mechanism and the electric motor. A portion of the refrigerant gas cools the electric motor and then is discharged from the discharge pipe. Other refrigerant gas brings upper and lower electric motor spaces of the electric motor into communication with each other through a passage formed between the electric motor and an inner wall of the casing, cools the electric motor, passes through a gap between a rotor and a stator of the electric motor, enters the electric motor space in the upper portion of the electric motor and is discharged out from the discharge pipe.